Update Payment Plan Offer

Use this operation for one or both of the following:

• Indicate that the payer has accepted a payment plan offer.

• Provide the serial number(s) for the item(s) contained in the order for which the payment plan offer applies.

You must indicate that the payer has accepted a payment plan offer before proceeding with the payment. The payment plan service provider may request additional details (serial numbers of the items in the order) or may indicate that the offer is no longer available. If you do not have the serial numbers available at the time of payment, you can submit the serial numbers (using this operation) later on, but must have submitted them before capturing the funds.

POST https://test-bankalfalah.gateway.mastercard.com/api/nvp/version/66

Authentication

This operation requires authentication via one of the following methods:


  • Certificate authentication.
  • To authenticate to the API two additional NVP parameters must be supplied in the request. Provide 'merchant.<your gateway merchant ID>' in the apiUsername field and your API password in the apiPassword field.

Request

Fields

apiOperation String = UPDATE_PAYMENT_PLAN_OFFER FIXED

Any sequence of zero or more unicode characters.

correlationId String OPTIONAL

A transient identifier for the request, that can be used to match the response to the request.

The value provided is not validated, does not persist in the gateway, and is returned as provided in the response to the request.

Data can consist of any characters

Min length: 1 Max length: 100
merchant Alphanumeric + additional characters REQUIRED

The unique identifier issued to you by your payment provider.

This identifier can be up to 12 characters in length.

Data may consist of the characters 0-9, a-z, A-Z, '-', '_'

Min length: 1 Max length: 40
order.amount Decimal OPTIONAL

The total amount for the order. This is the net amount plus any surcharge.

If you provide any sub-total amounts, then the sum of these amounts (order.itemAmount, order.taxAmount, order.shippingAndHandlingAmount, order.cashbackAmount, order.gratuityAmount and order.dutyAmount), minus the order.discountAmount must equal the net amount.

The value of this field in the response is zero if payer funds are not transferred.

Data is a string that consists of the characters 0-9 and '.' and represents a valid decimal number.

Min length: 1 Max length: 14
order.currency Upper case alphabetic text OPTIONAL

The currency of the transaction expressed as an ISO 4217 alpha code, e.g. USD.

Data must consist of the characters A-Z

Min length: 3 Max length: 3
order.item[n] OPTIONAL

Submit this parameter group only if you have received the parameter paymentPlan.accept.serialNumberRequired in the response for the accepted offer.The items and the serial numbers as requested by the service provider while conditionally accepting the payment plan offer

order.item[n].quantity Decimal OPTIONAL

The quantity of the item.

Data is a string that consists of the characters 0-9 and '.' and represents a valid decimal number greater than zero.

Min length: 0 Max length: 30
order.item[n].serialNumber String OPTIONAL

The serial number of the item.

Data can consist of any characters

Min length: 0 Max length: 200
order.item[n].sku String OPTIONAL

The SKU (Stock Keeping Unit) or the item identifier for this item.

Data can consist of any characters

Min length: 1 Max length: 127
order.item[n].unitPrice Decimal OPTIONAL

The cost price for the item.

This amount is multiplied with the item quantity (item.quantity) to determine the total amount for this item (item.amount). This amount does not include the tax amount and/or discount amount applicable to this item.

Data is a string that consists of the characters 0-9 and '.' and represents a valid decimal number.

Min length: 1 Max length: 14 Max post-decimal digits: 3
paymentPlanOffer OPTIONAL

Details about the payment plan offers available for this order.

paymentPlanOffer.payerAcceptance Boolean OPTIONAL

Indicates that the payer has accepted the payment plan offer.

The values 'true' or 'false'. (For a complete description, see http://www.w3.org/TR/xmlschema-2/#boolean.)

paymentPlanOffer.termsAndConditionsDisplay Enumeration OPTIONAL

Indicates whether or not you have displayed the terms and conditions text to the payer for the payment plan offer and payer has accepted the offer.

Value must be a member of the following list. The values are case sensitive.

NONE

You have not displayed the terms and conditions to the payer as you have not received any terms and condition text or terms and conditions acceptance in the PAYMENT_PLAN_OFFERS_INQUIRY response.

TERMS_AND_CONDITIONS_AND_ACCEPTANCE

You have displayed the terms and conditions and the payer has accepted.

TERMS_AND_CONDITIONS_ONLY

You have displayed the terms and conditions to the payer but payer did not actively accept as you may not require the terms and conditions acceptance.

paymentPlanOffer.id Alphanumeric REQUIRED

The unique identifier of the payment plan offer that the payer has accepted.

You must provide the payment plan offer ID returned to you in the PAYMENT_PLAN_OFFERS_INQUIRY response.

Data may consist of the characters 0-9, a-z, A-Z

Min length: 1 Max length: 60
session.id ASCII Text OPTIONAL

Identifier of the payment session containing values for any of the request fields to be used in this operation.

Values provided in the request will override values contained in the session.

Data consists of ASCII characters

Min length: 31 Max length: 35
sourceOfFunds OPTIONAL

Information about the payment type selected by the payer for this payment and the source of the funds.

The source of funds information may be represented by combining one or more of the following: explicitly provided card details, a session identifier which the gateway will use to look up the card details and/or a gateway token. Precedence rules will be applied in that explicitly provided card details will override session card details which will override gateway token details. Each of these may represent partial card details, however the combination must result in a full and complete set of card details. See Using Multiple Sources of Card Details for examples.

sourceOfFunds.provided OPTIONAL

Information about the source of funds when it is directly provided (as opposed to via a token or session).

sourceOfFunds.provided.card OPTIONAL

Details about the card.

sourceOfFunds.provided.card.expiry OPTIONAL

Expiry date, as shown on the card.

sourceOfFunds.provided.card.expiry.month Digits REQUIRED

Month, as shown on the card.

Months are numbered January=1, through to December=12.

Data is a number between 1 and 12 represented as a string.

sourceOfFunds.provided.card.expiry.year Digits REQUIRED

Year, as shown on the card.

The Common Era year is 2000 plus this value.

Data is a string that consists of the characters 0-9.

Min length: 2 Max length: 2
sourceOfFunds.provided.card.number Digits OPTIONAL

The account number of the payer's account used for the payment.

On requests, populate this field with the account number embossed onto the card as provided by the payer. On response, the card number will be populated in 6.4 masking format, for example, 000000xxxxxx0000.

Data is a string that consists of the characters 0-9.

Min length: 9 Max length: 19
sourceOfFunds.token Alphanumeric OPTIONAL

The token you supply that you wish to create or update.

You can only supply this value when creating a token if your token repository is configured to support merchant-supplied tokens.

On response, the format of the token depends on the token generation strategy configured for your repository. See Tokenization for more details.

Data may consist of the characters 0-9, a-z, A-Z

Min length: 1 Max length: 40

Response

Fields

correlationId String CONDITIONAL

A transient identifier for the request, that can be used to match the response to the request.

The value provided is not validated, does not persist in the gateway, and is returned as provided in the response to the request.

Data can consist of any characters

Min length: 1 Max length: 100
order.amount Decimal CONDITIONAL

The total amount for the order. This is the net amount plus any surcharge.

If you provide any sub-total amounts, then the sum of these amounts (order.itemAmount, order.taxAmount, order.shippingAndHandlingAmount, order.cashbackAmount, order.gratuityAmount), minus the order.discountAmount must equal the net amount.

The value of this field in the response may be zero if payer funds are not transferred.

A sequence of digits 0-9 separated by a '.' as a decimal indicator. Leading and trailing zeroes are optional. If the fractional part is zero, the '.' and following zero(es) can be omitted. (For a complete description, see http://www.w3.org/TR/xmlschema-2/#decimal.)

Max value: 1000000000000 Min value: 0 Max post-decimal digits: 3
order.currency Upper case alphabetic text CONDITIONAL

The currency of the order expressed as an ISO 4217 alpha code, e.g. USD.

Data must consist of the characters A-Z

Min length: 3 Max length: 3
order.item[n] CONDITIONAL

Submit this parameter group only if you have received the parameter paymentPlan.accept.serialNumberRequired in the response for the accepted offer.The items and the serial numbers as requested by the service provider while conditionally accepting the payment plan offer

order.item[n].quantity Decimal CONDITIONAL

The quantity of the item.

A sequence of digits 0-9 separated by a '.' as a decimal indicator. Leading and trailing zeroes are optional. If the fractional part is zero, the '.' and following zero(es) can be omitted. (For a complete description, see http://www.w3.org/TR/xmlschema-2/#decimal.)

Max value: 1000000000000 Min value: 0
order.item[n].serialNumber String CONDITIONAL

The serial number of the item.

Data can consist of any characters

Min length: 0 Max length: 200
order.item[n].sku String CONDITIONAL

The SKU (Stock Keeping Unit) or the item identifier for this item.

Data can consist of any characters

Min length: 1 Max length: 127
order.item[n].unitPrice Decimal CONDITIONAL

The cost price for the item.

This amount is multiplied with the item quantity (item.quantity) to determine the total amount for this item (item.amount). This amount does not include the tax amount and/or discount amount applicable to this item.

A sequence of digits 0-9 separated by a '.' as a decimal indicator. Leading and trailing zeroes are optional. If the fractional part is zero, the '.' and following zero(es) can be omitted. (For a complete description, see http://www.w3.org/TR/xmlschema-2/#decimal.)

Max value: 1000000000000 Min value: 0 Max post-decimal digits: 3
paymentPlanOffer ALWAYS PROVIDED

Details about the payment plan offers available for this order.

paymentPlanOffer.offerId Alphanumeric + additional characters CONDITIONAL

The unique identifier of the payment plan offer that the payer has accepted.

The gateway will use the details of this offer for this transaction.

Data may consist of the characters 0-9, a-z, A-Z, '-', '_'

Min length: 1 Max length: 60
response ALWAYS PROVIDED

Details about the outcome of the operation including response details provided by the payment plan service provider.

response.additionalResponseData Upper case alphabetic text CONDITIONAL

Provides additional data returned by the payment plan service provider that could be of interest to you.

The data is provided as as series of name-value pairs where the name is the payment plan service provider field and the value is exactly as provided by the payment plan service provider.

Data must consist of the characters A-Z

Min length: 1 Max length: 4000
response.gatewayCode Enumeration ALWAYS PROVIDED

Summary of the success or otherwise of the proposed operation.

Value must be a member of the following list. The values are case sensitive.

ACCEPTED

The service provider has accepted the offer and would like you to proceed with the payment. The service provider may want you to submit the serial number for the sku returned in the response. The serial number must be submitted before shipping the goods.

PROVIDER_SYSTEM_ERROR

The gateway has received a response from the provider that indicates that an error occurred in the payment plan service provider's system.

REJECTED

The service provider has rejected the offer. The service provider may return serial numbers if the request was rejected because of the invalid serial numbers.

TIMED_OUT

The gateway has timed out the request to the payment plan service provider because it did not receive a response.

UNSPECIFIED_FAILURE

The gateway has no information about the outcome of the operation. Contact the payment plan service provider.

response.providerCode Upper case alphabetic text CONDITIONAL

A code that indicates the outcome of the operation as returned by the payment plan service provider.

Data must consist of the characters A-Z

Min length: 1 Max length: 30
response.providerMessage Upper case alphabetic text CONDITIONAL

A short textual description that indicates the outcome of the operation as returned by the payment plan service provider.

Data must consist of the characters A-Z

Min length: 1 Max length: 127
result Enumeration ALWAYS PROVIDED

A system-generated high level overall result of the operation.

Value must be a member of the following list. The values are case sensitive.

FAILURE

The operation was declined or rejected by the gateway, acquirer or issuer

PENDING

The operation is currently in progress or pending processing

SUCCESS

The operation was successfully processed

UNKNOWN

The result of the operation is unknown

serialNumbers CONDITIONAL

If the payment plan service provider requires you to provide the serial numbers for any of the SKUs in the order, this parameter group contains the list of SKUs for which serial numbers are requested and the due date for their submission.

You must provide these serial numbers before you capture the funds.

serialNumbers.dueDate Date CONDITIONAL

The due date for submitting the required serial numbers to the payment plan service provider.

Data must comply with ISO 8601 extended date format, yyyy-mm-dd

serialNumbers.skus[n] String CONDITIONAL

The SKU(s) for which the payment plan service provider has requested that you provide a serial number.

Data can consist of any characters

Min length: 1 Max length: 127
sourceOfFunds CONDITIONAL

Information about the payment type selected by the payer for this payment and the source of the funds.

The source of funds information may be represented by combining one or more of the following: explicitly provided card details, a session identifier which the gateway will use to look up the card details and/or a gateway token. Precedence rules will be applied in that explicitly provided card details will override session card details which will override gateway token details. Each of these may represent partial card details, however the combination must result in a full and complete set of card details. See Using Multiple Sources of Card Details for examples.

sourceOfFunds.provided CONDITIONAL

Information about the source of funds when it is directly provided (as opposed to via a token or session).

sourceOfFunds.provided.card CONDITIONAL

Details about the card.Use this parameter group when you have sourced payment details using the card details entered directly.

sourceOfFunds.provided.card.expiry CONDITIONAL

Expiry date, as shown on the card.

sourceOfFunds.provided.card.expiry.month Digits ALWAYS PROVIDED

Month, as shown on the card.

Months are numbered January=1, through to December=12.

Data is a number between 1 and 12 represented as a string.

sourceOfFunds.provided.card.expiry.year Digits ALWAYS PROVIDED

Year, as shown on the card.

The Common Era year is 2000 plus this value.

Data is a string that consists of the characters 0-9.

Min length: 2 Max length: 2
sourceOfFunds.provided.card.number Masked digits CONDITIONAL

The account number of the payer's account used for the payment.

On requests, populate this field with the account number embossed onto the card as provided by the payer. On response, the card number will be populated in 6.4 masking format, for example, 000000xxxxxx0000.

Data is a string that consists of the characters 0-9, plus 'x' for masking

Min length: 9 Max length: 19
sourceOfFunds.token Alphanumeric CONDITIONAL

The token you supply that you wish to create or update.

You can only supply this value when creating a token if your token repository is configured to support merchant-supplied tokens.

On response, the format of the token depends on the token generation strategy configured for your repository. See Tokenization for more details.

Data may consist of the characters 0-9, a-z, A-Z

Min length: 1 Max length: 40

Errors

error

Information on possible error conditions that may occur while processing an operation using the API.

error.cause Enumeration

Broadly categorizes the cause of the error.

For example, errors may occur due to invalid requests or internal system failures.

Value must be a member of the following list. The values are case sensitive.

INVALID_REQUEST

The request was rejected because it did not conform to the API protocol.

REQUEST_REJECTED

The request was rejected due to security reasons such as firewall rules, expired certificate, etc.

SERVER_BUSY

The server did not have enough resources to process the request at the moment.

SERVER_FAILED

There was an internal system failure.

error.explanation String

Textual description of the error based on the cause.

This field is returned only if the cause is INVALID_REQUEST or SERVER_BUSY.

Data can consist of any characters

Min length: 1 Max length: 1000
error.field String

Indicates the name of the field that failed validation.

This field is returned only if the cause is INVALID_REQUEST and a field level validation error was encountered.

Data can consist of any characters

Min length: 1 Max length: 100
error.supportCode String

Indicates the code that helps the support team to quickly identify the exact cause of the error.

This field is returned only if the cause is SERVER_FAILED or REQUEST_REJECTED.

Data can consist of any characters

Min length: 1 Max length: 100
error.validationType Enumeration

Indicates the type of field validation error.

This field is returned only if the cause is INVALID_REQUEST and a field level validation error was encountered.

Value must be a member of the following list. The values are case sensitive.

INVALID

The request contained a field with a value that did not pass validation.

MISSING

The request was missing a mandatory field.

UNSUPPORTED

The request contained a field that is unsupported.

result Enumeration

A system-generated high level overall result of the operation.

Value must be a member of the following list. The values are case sensitive.

ERROR

The operation resulted in an error and hence cannot be processed.